/****************************************************************************
 * 
 *
 ***************************************************************************/

#ifndef __COMMUNICATE_H__
#define __COMMUNICATE_H__

#ifdef COMMUNICATE_H_GLOBAL
  #define COMMUNICATE_H_EXTERN 
#else
  #define COMMUNICATE_H_EXTERN extern
#endif

#define GIMBAL_CAN_ID         0x500
#define CHASSIS_CAN_ID        0x600

#define RECV_PROTOCOL_SIGNAL      ( 1 << 0 )
#define SEND_PROTOCOL_SIGNAL      ( 1 << 1 )
#define REFEREE_SIGNAL            ( 1 << 2 )

enum interface{
  USB_INTERFACE = 0,
  CAN2_0x500_INTERFACE,
  CAN2_0x600_INTERFACE,
};

struct uwb_data{
  int16_t   x;
  int16_t   y;
  uint16_t  yaw;
  int16_t   distance[6];
  uint16_t  error;
  uint16_t  res;
};

int32_t gimbal_adjust(void);


#endif // __COMMUNICATE_H__
